<template>
  <component :is="page" />
</template>

<script>
import HomePage from "./HomePage.vue";
import login from "./login.vue";
import { useRoute } from "vue-router";
import { computed } from "vue";
export default {
  components: { HomePage, login },
  setup() {
    let route = useRoute();
    const page = computed(() => {
      return route.name === "Login" ? "login" : "HomePage";
    });
    return {
      page,
    };
  },
};
</script>

<style>
body {
  padding: 0;
  margin: 0;
}
</style>
